package com.controller;


import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.domain.User;
import com.repository.UserRepository;

@Controller
@RequestMapping("/asd")
public class LoginController {
	@Autowired
	private UserRepository userRepository;
	 
	@RequestMapping("/qwe")
	@Transactional
	public String qwe(){
		User user = new User();
		user.setName("asd");
		user.setPassword("asd");
		userRepository.save(user);
		return "qwe";
	}
}
